Repository navigation
docs(owner-budget): correct three comments on #1557's code (stacked on #1557) - #1565
Closed
DealAppSeo wants to merge 2 commits into
Closed
DealAppSeo wants to merge 2 commits into
DealAppSeo wants to merge 2 commits into
Conversation
…r budget (flag off) The first live owner-budget run stopped at bind: the owner's wallet holds a proof-of-human SBT, so it bound as human_sbt, and ownerBuilderOfAgent returned null for every human_sbt owner. The budget is keyed by builder account, and the run had just created one for the same wallet. With HUMAN_SBT_OWNER_BUDGET_ENABLED=true (default off), a human_sbt owner's budget is the stake of the account that holds the binding's wallet. That wallet came from human_sbt_registry at bind, and an account exists only for a wallet that signed /account/connect. Two accounts matching the wallet is refused (ambiguous), a failed read is an error, a malformed wallet runs no query. The binding is unchanged, so the assurance label stays proof-of-human. Every money route (stake spend, spend limit, wallet-mode budget) already resolves the owner through this one function. The E2E script now continues past a human_sbt bind; step 3b answers no_owner_budget where the flag is off, before any USDC moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
's code (review of #1557) - owner-budget.ts: an account is not proof the wallet signed. POST /builder/register makes one behind an API key with no signature, so "only created for a wallet that signed" was false. - routes/agent-spend.ts: loadOwnerBuilder is null when there is no funding account, not "if not a builder"; a human_sbt owner has one with HUMAN_SBT_OWNER_BUDGET_ENABLED=true. - e2e owner-budget-testnet.ts: no_owner_budget surfaces at step 3b only in stake mode; in wallet mode 3b does not run and step R answers it. Comments only; no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Superseded by #1567. #1557 squash-merged, so this branch conflicted with 🤖 Addressed by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner action
Claude merges after you merge #1557 (LOW: comments only, no behaviour change). This PR is stacked on #1557 (base
claude/r2-human-sbt-owner-budget). When #1557 squash-merges, retarget this PR withgh pr edit <this> --base mainand rebase it. Under D-161, a LOW change still needs Claude, Grok, Strix and CI on one SHA before it auto-merges; none has run yet. No decision is needed from you.What this is
Three comments on #1557's code said the wrong thing (independent review of #1557). They are fixed here so #1557's reviewed head (
58fde210) stays fixed for tonight's packet.src/services/owner-budget.ts(ownerBuilderOfAgent doc). It said an account "is only created for a wallet that signed (POST /account/connect)". That is false:POST /builder/registerinserts one behind an API key, with no signature from the wallet [Vsrc/routes/v1.ts/builder/register→registerBuilderinserts intobuilders]. The comment now says an account is not proof of consent: what funds the budget is the stake, and two accounts for one wallet are refused as ambiguous [V, therows.length > 1throw in the same function].src/routes/agent-spend.ts(loadOwnerBuilderdoc). It said "null if not a builder". A verified human owner now has a funding account whenHUMAN_SBT_OWNER_BUDGET_ENABLED=true, so it says "null if there is none" and names both cases.scripts/e2e/owner-budget-testnet.ts(step 3 comment). It said step 3b answersno_owner_budget. Step 3b (spend limits) runs only in stake mode; in wallet mode step R answers it [V:if (fromStake)around 3b;no_owner_budgetis answered by both the spend-limit route and the spend dry run inroutes/agent-spend.ts].Comments only: the diff touches no executable line.
🤖 Generated with Claude Code